package com.manor.common.bean;

import com.alibaba.fastjson.annotation.JSONField;
import com.manor.common.utils.StringUtil;

/**
 * Created by cxf on 2017/8/22.
 * 收到送礼物消息的实体类
 */

public class ChatReceiveGiftBean {


    private String method;
    private int action;
    private String swftime;
    private String to_nickname;
    private String to_uid;
    private String uid;
    private String avatar;
    private String userNiceName;
    private int level;
    private String giftId;
    private int giftCount;
    private String giftName;
    private String giftIcon;
    private int lianCount = 1;
    private int gif;//是否是gif礼物  1是 0不是
    private int gitType;//豪华礼物类型 0是gif  1是svga
    private String gifUrl;
    private String mKey;
    private String sessionId;
    private String liveUserName;
    private String liveUserAvatar;
    private String group_id;
    private boolean isLocal;//是否本地礼物消息
    private boolean isCall;//是否通话礼物


    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    @JSONField(name = "liveu_avatar_thumb")
    public String getLiveUserAvatar() {
        return liveUserAvatar;
    }

    @JSONField(name = "liveu_avatar_thumb")
    public void setLiveUserAvatar(String liveUserAvatar) {
        this.liveUserAvatar = liveUserAvatar;
    }

    @JSONField(name = "liveu_user_nickname")
    public String getLiveUserNiceName() {
        if (liveUserName == null)
            liveUserName = "";
        return liveUserName;
    }

    @JSONField(name = "liveu_user_nickname")
    public void setLiveUserNiceName(String liveUserName) {
        this.liveUserName = liveUserName;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public int getAction() {
        return action;
    }

    public void setAction(int action) {
        this.action = action;
    }

    public String getSwftime() {
        return swftime;
    }

    public void setSwftime(String swftime) {
        this.swftime = swftime;
    }

    public String getTo_nickname() {
        return to_nickname;
    }

    public void setTo_nickname(String to_nickname) {
        this.to_nickname = to_nickname;
    }

    public String getTo_uid() {
        return to_uid;
    }

    public void setTo_uid(String to_uid) {
        this.to_uid = to_uid;
    }

    public String getLiveUserName() {
        return liveUserName;
    }

    public void setLiveUserName(String liveUserName) {
        this.liveUserName = liveUserName;
    }

    @JSONField(name = "user_nickname")
    public String getUserNiceName() {
        return userNiceName;
    }

    @JSONField(name = "user_nickname")
    public void setUserNiceName(String userNiceName) {
        this.userNiceName = userNiceName;
    }

    @JSONField(name = "level")
    public int getLevel() {
        return level;
    }

    @JSONField(name = "level")
    public void setLevel(int level) {
        this.level = level;
    }

    @JSONField(name = "giftid")
    public String getGiftId() {
        return giftId;
    }

    @JSONField(name = "giftid")
    public void setGiftId(String giftId) {
        this.giftId = giftId;
    }

    @JSONField(name = "giftcount")
    public int getGiftCount() {
        return giftCount;
    }

    @JSONField(name = "giftcount")
    public void setGiftCount(int giftCount) {
        this.giftCount = giftCount;
    }

    @JSONField(name = "giftname")
    public String getGiftName() {
        return giftName;
    }

    @JSONField(name = "giftname")
    public void setGiftName(String giftName) {
        this.giftName = giftName;
    }

    @JSONField(name = "gifticon")
    public String getGiftIcon() {
        return giftIcon;
    }

    @JSONField(name = "gifticon")
    public void setGiftIcon(String giftIcon) {
        this.giftIcon = giftIcon;
    }


    @JSONField(name = "type")
    public int getGif() {
        return gif;
    }

    @JSONField(name = "type")
    public void setGif(int gif) {
        this.gif = gif;
    }

    @JSONField(name = "swf")
    public String getGifUrl() {
        return gifUrl;
    }

    @JSONField(name = "swf")
    public void setGifUrl(String gifUrl) {
        this.gifUrl = gifUrl;
    }

    @JSONField(name = "swftype")
    public int getGitType() {
        return gitType;
    }

    @JSONField(name = "swftype")
    public void setGitType(int gitType) {
        this.gitType = gitType;
    }

    @JSONField(name = "showid")
    public String getSessionId() {
        return sessionId;
    }

    @JSONField(name = "showid")
    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }

    public int getLianCount() {
        return lianCount;
    }

    public void setLianCount(int lianCount) {
        this.lianCount = lianCount;
    }

    @JSONField(name = "group_id")
    public String getGroup_id() {
        return group_id;
    }

    @JSONField(name = "group_id")
    public void setGroup_id(String group_id) {
        this.group_id = group_id;
    }

    @JSONField(name = "isLocal")
    public boolean isLocal() {
        return isLocal;
    }

    @JSONField(name = "isLocal")
    public void setLocal(boolean local) {
        isLocal = local;
    }

    @JSONField(name = "isCall")
    public boolean isCall() {
        return isCall;
    }

    @JSONField(name = "isCall")
    public void setCall(boolean call) {
        isCall = call;
    }

    public String getKey() {
        if (StringUtil.isEmpty(mKey)) {
            mKey = this.uid + this.giftId + this.giftCount + this.isLocal;
        }
        return mKey;
    }



    @Override
    public String toString() {
        return "ChatReceiveGiftBean{" +
                "uid='" + uid + '\'' +
                ", avatar='" + avatar + '\'' +
                ", userNiceName='" + userNiceName + '\'' +
                ", level=" + level +
                ", giftId='" + giftId + '\'' +
                ", giftCount=" + giftCount +
                ", giftName='" + giftName + '\'' +
                ", giftIcon='" + giftIcon + '\'' +
                ", lianCount=" + lianCount +
                ", gif=" + gif +
                ", gitType=" + gitType +
                ", gifUrl='" + gifUrl + '\'' +
                ", sessionId='" + sessionId + '\'' +
                ", liveUserName='" + liveUserName + '\'' +
                ", liveUserAvatar='" + liveUserAvatar + '\'' +
                ", group_id='" + group_id + '\'' +
                ", isLocal=" + isLocal +
                ", isCall=" + isCall +
                '}';
    }
}
